<?php 
$v_url_send_question = "index.php?fuseaction=DISPLAY_SINGLE_QA_QUESTION_FOR_SENDING";
$v_current_style_name = "odd_row";
$v_next_style_name="";
?>
<table width="100%" cellpadding="0" cellspacing="0">
	<form action="index.php" method="post" name="frm_qa_search_by_fts">
	<input name="fuseaction" type="hidden" value="DISPLAY_ALL_QA_QUESTION_BY_TIME">
	<input type="hidden" name="status" value="<?php echo $v_status;?>">
	<tr class="page_title">
		<td ><?php echo CONST_SEARCH_FTS_RESULT_LABEL;?><small class="number_label"><?php echo "(".$v_total_qa_count.")"; ?></small></td>
	</tr>
	<tr> 
		<td class="send_qa_link" >
			<a href="<?php echo $v_url_send_question;?>"><?php echo CONST_QA_QUESTION_FOR_ANSWER_TITLE;?></a>
			<img src="<?php echo $_ISA_IMAGE_URL_PATH?>send_qa.gif">
		</td>
	</tr>	
	<tr><td height="20"></td></tr>
</table><?php
if ($v_num_qa >0){?>
	<table width="100%" cellpadding="0" cellspacing="0">
<?php
		for($i=0;$i< $v_num_qa;$i++){//mo vong for
			$v_qa_stt = $i +1 + ($page -1) * $v_limit;
			$v_qa_id = $arr_qa[$i]['0'];
			$v_qa_name= $arr_qa[$i]['1'];		
			$v_questioner_name = $arr_qa[$i]['2'];
			$v_questioner_add= $arr_qa[$i]['3'];		
			$v_questioner_date= _yyyymmdd_to_ddmmyyyy($arr_qa[$i]['4']);						
			$v_url = "index.php?fuseaction=DISPLAY_SINGLE_QA_QUESTION&qa_id=".$v_qa_id;
			$v_questioner_info = "( ".$v_questioner_name;
			if (strlen(trim($v_questioner_add)) > 0){
				$v_questioner_info = $v_questioner_info . ', '.$v_questioner_add;
			}							
			$v_questioner_info = $v_questioner_info . ',  ng&#224;y '.$v_questioner_date.")";
			if ($v_current_style_name == "odd_row"){
				$v_current_style_name = "round_row";
			}else{
				$v_current_style_name = "odd_row";
			}?>		
			<tr class="<?php echo $v_current_style_name ?>"> 
				<td align="left">
					<img src="<?php echo $_ISA_IMAGE_URL_PATH?>nut_before_article.gif" >
					<a class="normal_label" href="<?php echo $v_url; ?>"><?php echo $v_qa_name;?><small class="normal_label"><?php echo $v_questioner_info;?></small></a>&nbsp;
				</td>					
			</tr><?php
		}//vong for	
		if ($v_current_style_name == "odd_row"){
			$v_next_style_name = "round_row";
		}else{
			$v_next_style_name = "odd_row";
		}
		echo _add_empty_row($v_num_qa,CONST_NUMBER_OF_QA_PER_PAGE,$v_current_style_name,$v_next_style_name,1);?>							
	</table><?php
	if ($v_total_qa_count > $v_limit){//(*)
		$url="index.php?fuseaction=DISPLAY_ALL_QA_BY_FTS";
		$url=$url."&searched_text_qa=".$v_searched_text_qa; ?>
		<table>
			<tr><td height="10pt"></td></tr>
			<tr>
				<col width="5%"><col width="95%">
				<td align="center" class="normal_label">
					<b><?php
					if ($page == 1)  
						echo "<img src=" . $_ISA_IMAGE_URL_PATH . "d-arrow-left.jpg class=normal_image align=center>"; 
					else            
						echo "<a href=\"".$url. "&page=".($page - 1). "\">". "<img src=" . $_ISA_IMAGE_URL_PATH . "arrow-left.jpg class=normal_image align=center>" . "</a>";
					
					for ($i = 1; $i <= $pager->numPages; $i++) { 
						echo " | "; 
						if ($i == $pager->page)
							echo $i; 
						else 
							echo "<a href=\"".$url. "&page=". $i. "\">". $i."</a>";
					}//dong for
					
					if ($page == $pager->numPages) 
						echo " | ". "<img src=" . $_ISA_IMAGE_URL_PATH . "d-arrow-right.jpg class=normal_image align=center>"; 
					else            
						echo " | ". "<a href=\"".$url. "&page=".($page + 1) . "\">" . "<img src=" . $_ISA_IMAGE_URL_PATH . "arrow-right.jpg class=normal_image align=center>" . "</a>";	?>
					</b>
				</td>
			</tr>
		</table><?php
	}
}else{ ?>
		<small class="normal_label"><?php echo CONST_NO_QA_MESSAGE; ?></small><?php
}?>

<table width="100%" cellpadding="0" cellspacing="0">
	<tr><td height="10pt"></td></tr>
	<tr align="center">
		<td><input Type="button" Name="btn_back" class="normal_button" value="<?php echo _CONST_BACK_BUTTON;?>" onClick="goback();"></td>
	</tr>
</form>		
</table>


